import torch 

import torch.nn as nn 
import torch.nn.functional as F
from model import CNN 

if __name__ == "__main__":
    # src_data = torch.load("src_data_standard.pkl")
    # src_data = src_data[0:20]
    # device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    # cnn_layer = CNN(device=device)
    # cnn_layer.load_state_dict(torch.load("./model_dict_cnn.pkl", map_location="cpu"))
    # out = cnn_layer(src_data)
    # print(out)

    # src_data = torch.load("src_data_raw滤波.pkl")
    # batch, time, channel = src_data.shape
    # src_data = src_data.view(-1, channel)
    # # print(src_data.shape)
    # mean = torch.mean(src_data, dim=0)
    # # print(mean.shape)
    # std = torch.std(src_data, dim=0)
    # data = (src_data - mean) / std
    # data = data.view((batch, time, channel))

    # print(torch.mean(data))

    # torch.save(data, "./src_data_standard_channel滤波.pkl")

    t1 = torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=torch.float32)
    print(t1.shape)

    print(torch.mean(t1, dim=0))

    